<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="./css/index.css">
<link href="../css/index.css" rel="stylesheet" type="text/css">
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

</head>
  <a href="./index.php">
	  <div id="cabecera">
	  </div>
  </a>
  <p></p>
    <div>
    	<table id="menu">
  		<tr>
    		<td><a class="menu_el" href="index.php">Index</a></td>
			<?php if(isset($_SESSION['id'], $_SESSION['vorname'], $_SESSION['name'])) : ?>
			<td><a class="menu_el" href="profile.php">Profile</a></td>
      <td><a class="menu_el" href="missions.php">Missions</a></td>
      <td><a class='menu_el' href='mecha.php'>Mecha</a></td>
        <?php if ($_SESSION['workstation']>2) : ?>
          <td><a class='menu_el' href='news_page.php'>News</a></td>
        <?php endif; ?>
        <?php if ($_SESSION['workstation']>8) : ?>
          <td><a class='menu_el' href='mana.php'>Management</a></td>
        <?php endif; ?>
        <?php if ($_SESSION['id']=="root") : ?> 
          <td><a class="menu_el" href="admin.php">Admin</a></td>
        <?php endif; ?>
      <?php else : ?>
    		<td><a class="menu_el" href="login_page.php">Login</a></td>
			<?php endif; ?>
    		<td><a class="menu_el" href='aboutus.php'>About us</a></td>

      <?php if(isset($_SESSION['id'], $_SESSION['vorname'], $_SESSION['name'])) : ?>  
        <div class="menu_right" id="menu">
          <img width="20" height="20" src="./images/<?php echo $_SESSION['id']?>.jpg">
          <a class="menu_el" href="log_out.php">Logout</a></div>
      <?php else : ?>
        <div class="menu_right" id="menu">You must <a href="login_page.php">login</a> or <a href="register.php">register</a></div>
      <?php endif; ?>
  		</tr>
		</table>
    </div>

</html>